package ${packageStr};

import org.springframework.beans.factory.annotation.Autowired;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import ${entityPath};
import ${mapperPath};
import ${servicePath};

@Service
public class ${serviceImplName} extends ServiceImpl<${mapperName},${entityName}> implements ${serviceName}{
    @Autowired
    private ${mapperName}   ${repostioryName};

    /**插入有值的列  */
    @Override
    public int insertSelective(${entityName} entity){
       return ${repostioryName}.insertSelective(entity);
    }

    /**插入数据  */
    @Override
    public boolean insert(${entityName} entity){
       return save(entity);
    }

    /**根据主键修改数据*/
    @Override
    public boolean  updateByPrimaryKey(${entityName} entity){
       return updateById(entity);
    }

    <#if "!statucFlag" !="1">
        /***根据主键删除数据*/
        @Override
       public boolean deleteById(${idType} ${idFiled}){
            return removeById(${idFiled});
       }
    </#if>
}